x86: add generic resource (e.g. MSR) access hypercall
authorDongxiao Xu <dongxiao.xu@intel.com>
Mon, 6 Oct 2014 10:28:09 +0000 (12:28 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 6 Oct 2014 10:28:09 +0000 (12:28 +0200)
commit443035c40ab6a0566133a55090532740c52d61d3
treeeae4ed062a8e79f9c462cbfd50baccd4aefbfb3c
parent070493dfd2788e061b53f074b7ba97507fbcbf65
x86: add generic resource (e.g. MSR) access hypercall

Add a generic resource access hypercall for tool stack or other
components, e.g., accessing MSR, port I/O, etc.

The resource is abstracted as a resource address/value pair.
The resource access can be any type of XEN_RESOURCE_OP_*(current
only support MSR and it's white-listed). The resource operations
are always runs on cpu that caller specified. If caller does not
care this, it should use current cpu to eliminate the IPI overhead.

Batch resource operations in one call are also supported but the
max number currently is limited to 2. The operations in a batch are
non-preemptible and execute in their original order. If preemptible
batch is desirable, then multicall mechanism can be used.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/arch/x86/platform_hypercall.c
xen/arch/x86/x86_64/platform_hypercall.c
xen/include/public/platform.h
xen/include/xlat.lst